Non-transitory computer-readable storage medium storing image processing program, image processing system, image processing apparatus, and image processing method

ABSTRACT

An exemplary image processing system first writes normal line information and color information into the G buffer and depth information into the depth buffer for a first object. Next, at a time of writing the normal line information into the G buffer for a second object, the exemplary image processing system calculates a difference between the depth information of a first object and the depth information of the second object, and blends the normal line information of the first object with the normal line information of the second object based on the difference, and writes the blended normal line information into the G buffer. The exemplary image processing system then renders an image in a frame buffer based on information stored in the G buffer and light source information.

CROSS REFERENCE TO RELATED APPLICATION

This application claims priority to Japanese Patent Application No.2022-120844 filed on Jul. 28, 2022, the entire contents of which areincorporated herein by reference.

FIELD

An exemplary embodiment relates to a non-transitory computer-readablestorage medium storing an image processing program capable of generatingan image of an object in a virtual space, and relates to an imageprocessing system, an image processing apparatus, and an imageprocessing method.

BACKGROUND AND SUMMARY

To date, there has been an image processing system that arranges, forexample, an object having a protrusion in a virtual space and generatesan image of the object.

When an image of such an object having a protrusion is generated, aconnecting portion of the protrusion may be conspicuous, and there isroom for improvement to achieve natural appearance of the connectingportion.

Therefore, an object of the exemplary embodiment is to provide anon-transitory computer-readable storage medium storing an imageprocessing program capable of generating an image with naturalappearance of a connecting portion of an object, and to provide an imageprocessing system, an image processing apparatus, and an imageprocessing method.

To achieve the above-described object, this exemplary embodiment adoptsa configuration as described below.

(First Configuration)

An image processing program of the first configuration causes thecomputer of an information processing apparatus to generate an image ofan object in a virtual space based on deferred rendering. The imageprocessing program causes the computer to perform first processingincluding at least writing of depth information of a first object into adepth buffer, writing of normal line information of the first objectinto a first buffer, and writing of color information of the firstobject into a second buffer. After the first processing, the imageprocessing program causes the computer to: perform a depth test on asecond object in the virtual space and second processing including atleast writing of the depth information of the second object into thedepth buffer, writing of the normal line information of the secondobject into the first buffer, and writing of the color information ofthe second object into the second buffer; at a time of writing thenormal line information of the second object into the first buffer inthe second processing, write the normal line information of the secondobject into the first buffer so that, based on a difference between thedepth information of the second object and the depth information alreadystored in the depth buffer, the normal line information of the secondobject is blended with the normal line information already stored in thefirst buffer for a portion where the difference is small. Then, theimage processing program causes the computer to generate an image byrendering based on information stored in at least the first buffer andthe second buffer.

According to the above, the normal line information of the second objectis written into the first buffer so that, for a portion where the depthinformation is close to the first object, the normal line information ofthe first object is blended with the normal line information of thesecond object. This allows generation of an image in which theconnecting portion between the first object and the second object is notconspicuous and appears naturally.

(Second Configuration)

A second configuration may be the above first configuration adapted soas to cause the computer to write blended normal line information intothe first buffer at a time of writing the normal line information of thesecond object into the first buffer, the blended normal line informationobtained by blending the normal line information of the second objectwith the normal line information already stored in the first buffer at ablend ratio according to the difference.

According to the above, since the blend ratio is set according to thedifference in the depth information, the normal line information of thefirst object and the normal line information of the second object can beblended more naturally.

(Third Configuration)

A third configuration may be the second configuration adapted so thatthe blend ratio is set so that a proportion of the normal lineinformation already stored in the first buffer increases with a decreasein the difference.

According to the above, the proportion of the normal line informationalready stored in the first buffer increases with a decrease in thedifference in the depth information. Therefore, the normal lineinformation of the second object can be brought closer to the normalline information of the first object for the portion where thedifference in the depth information is small, at a time of writing thenormal line information of the second object into the first buffer. Thisallows the second object to fit in with the first object.

(Fourth Configuration)

A fourth configuration may be the first configuration adapted so thatthe image processing program causes the computer to write blended normalline information into the first buffer at a time of writing the normalline information of the second object into the first buffer, the blendednormal line information obtained by blending the normal line informationof the second object with the normal line information already stored inthe first buffer at a predetermined blend ratio for a pixel where thedifference is within a predetermined range.

According to the above, the normal line information of the second objectand the normal line information of the first object can be blended at apredetermined ratio for a pixel where the difference in the depthinformation is within the predetermined range.

(Fifth Configuration)

A fifth configuration may be any one of the first to fourthconfigurations adapted so as to cause the computer to, at a time ofwriting the color information of the second object into the secondbuffer, write the color information of the second object into the secondbuffer so that, based on the difference, the color information of thesecond object is blended with the color information already stored inthe second buffer for the portion where the difference is small.

According to the above, it is possible to blend the color information ofthe second object with the color information of the first object.

(Sixth Configuration)

A sixth configuration may be any one of the first to fifthconfigurations adapted so that the first object is a first part of acharacter, and the second object is a second part of the character.

According to the above, it is possible to achieve a less conspicuousconnecting portion between the first part and the second part of thecharacter.

(Seventh Configuration)

An image processing program of the first configuration causes a computerof the information processing apparatus to generate an image of anobject in a virtual space. The image processing program causes thecomputer to perform first processing including at least writing of depthinformation of a first object into a depth buffer, writing of normalline information of the first object into a normal line buffer, anddrawing of the first object into a frame buffer. After the firstprocessing, the image processing program causes the computer to performa depth test on a second object in the virtual space and secondprocessing including drawing of the second object in the frame buffer;and in the drawing of the second object in the frame buffer in thesecond processing, calculate normal line information so that, based on adifference between the depth information of the second object and thedepth information already stored in the depth buffer, the normal lineinformation of the second object is blended with the normal lineinformation already stored in the normal line buffer for a portion wherethe difference is small and perform rendering based on the calculatednormal line information.

According to the above, the normal line information of the first objectand the normal line information of the second object are blended for aportion where the depth information is close to the first object, andthe image is rendered based on the blended normal line information. Thisallows generation of an image in which the connecting portion betweenthe first object and the second object is not conspicuous.

Further, another exemplary embodiment may be an image processing system,an image processing apparatus, or an image processing method.

According to this exemplary embodiment, it is possible to generate animage in which the connecting portion between the first object and thesecond object is not conspicuous and appears naturally.

These and other objects, features, aspects and advantages will becomemore apparent from the following detailed description when taken inconjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an example non-limiting diagram showing an exemplary statewhere a left controller 3 and a right controller 4 are attached to amain body apparatus 2.

FIG. 2 is an example non-limiting block diagram showing an exemplaryinternal configuration of the main body apparatus 2.

FIG. 3 is an example non-limiting diagram showing a three-dimensionalmodel representing a virtual object 100 arranged in a virtual space.

FIG. 4 is an example non-limiting diagram showing an overview of imagegeneration processing of this exemplary embodiment.

FIG. 5 is an example non-limiting diagram providing a conceptualrepresentation of processing performed at a time of writing an arm part102 into a G buffer in step 2 of FIG. 4 .

FIG. 6 is an example non-limiting diagram providing a conceptualrepresentation of an image of the virtual object 100 in a case where theblend processing is not performed and an image of the virtual object 100in a case where the blend processing is performed.

FIG. 7 is an example non-limiting diagram showing exemplary data storedin a memory of the main body apparatus 2 while game processing isexecuted.

FIG. 8 is an example non-limiting flowchart showing exemplary gameprocessing executed by a processor 81 of the main body apparatus 2.

FIG. 9 is an example non-limiting flowchart showing the image generationprocessing of step S104.

DETAILED DESCRIPTION OF NON-LIMITING EXAMPLE EMBODIMENTS

(System Configuration)

A game system according to an example of an exemplary embodiment isdescribed below. An example of a game system 1 according to theexemplary embodiment includes a main body apparatus (an informationprocessing apparatus; which functions as a game apparatus main body inthe exemplary embodiment) 2, a left controller 3, and a right controller4. Each of the left controller 3 and the right controller 4 isattachable to and detachable from the main body apparatus 2. That is,the game system 1 can be used as a unified apparatus obtained byattaching each of the left controller 3 and the right controller 4 tothe main body apparatus 2. Further, in the game system 1, the main bodyapparatus 2, the left controller 3, and the right controller 4 can alsobe used as separate bodies. Hereinafter, first, the hardwareconfiguration of the game system 1 according to the exemplary embodimentis described, and then, the control of the game system 1 according tothe exemplary embodiment is described.

FIG. 1 is a diagram showing an example of the state where the leftcontroller 3 and the right controller 4 are attached to the main bodyapparatus 2. As shown in FIG. 1 , each of the left controller 3 and theright controller 4 is attached to and unified with the main bodyapparatus 2. The main body apparatus 2 is an apparatus for performingvarious processes (e.g., game processing) in the game system 1. The mainbody apparatus 2 includes a display 12. Each of the left controller 3and the right controller 4 is an apparatus including operation sectionswith which a user provides inputs.

The left controller 3 and the right controller 4 are attachable to anddetachable from the main body apparatus 2. It should be noted thathereinafter, the left controller 3 and the right controller 4 willoccasionally be referred to collectively as a “controller”.

The main body apparatus 2 alone or the unified apparatus obtained byattaching the left controller 3 and the right controller 4 to the mainbody apparatus 2 may function as a mobile apparatus. The main bodyapparatus 2 or the unified apparatus may function as a handheldapparatus or a portable apparatus.

Further, the main body apparatus 2 includes a touch panel 13 on a screenof the display 12. In the exemplary embodiment, the touch panel 13 is ofa type that allows a multi-touch input (e.g., a capacitive type). Thetouch panel 13, however, may be of any type. For example, the touchpanel 13 may be of a type that allows a single-touch input (e.g., aresistive type).

FIG. 2 is a block diagram showing an example of the internalconfiguration of the main body apparatus 2.

The main body apparatus 2 includes a processor 81. The processor 81 isan information processing section for executing various types ofinformation processing to be executed by the main body apparatus 2. Theprocessor 81 includes a CPU (Central Processing Unit) and a GPU(Graphics Processing Unit). The processor 81 may be composed of an SoC(system-on-a-chip) having a plurality of functions such as a CPUfunction and a GPU function. It should be noted that the CPU and the GPUmay be configured as separate processors. Further, the processor 81 isprovided therein with a memory that temporarily stores data. Theprocessor 81 executes an information processing program (e.g., a gameprogram) stored in a storage section (specifically, an internal storagemedium such as a flash memory 84, an external storage medium attached tothe slot 23, or the like), thereby performing the various types ofinformation processing.

The main body apparatus 2 includes a flash memory 84 and a DRAM (DynamicRandom Access Memory) 85 as examples of internal storage media builtinto the main body apparatus 2. The flash memory 84 and the DRAM 85 areconnected to the processor 81. The flash memory 84 is a memory mainlyused to store various data (or programs) to be saved in the main bodyapparatus 2. The DRAM 85 is a memory used to temporarily store variousdata used for information processing.

The main body apparatus 2 includes a slot interface (hereinafterabbreviated as “I/F”) 91. The slot I/F 91 is connected to the processor81. The slot I/F 91 is connected to the slot 23, and in accordance withan instruction from the processor 81, reads and writes data from and tothe predetermined type of storage medium (e.g., a dedicated memory card)attached to the slot 23.

The processor 81 appropriately reads and writes data from and to theflash memory 84, the DRAM 85, and each of the above storage media,thereby performing the above information processing.

The main body apparatus 2 includes a network communication section 82.The network communication section 82 is connected to the processor 81.The network communication section 82 communicates (specifically, throughwireless communication) with an external apparatus via a network. In theexemplary embodiment, as a first communication form, the networkcommunication section 82 connects to a wireless LAN and communicateswith an external apparatus, using a method compliant with the Wi-Fistandard. Further, as a second communication form, the networkcommunication section 82 wirelessly communicates with another main bodyapparatus 2 of the same type, using a predetermined communication method(e.g., communication based on a unique protocol or infrared lightcommunication).

The main body apparatus 2 includes a controller communication section83. The controller communication section 83 is connected to theprocessor 81. The controller communication section 83 wirelesslycommunicates with the left controller 3 and/or the right controller 4.The communication method between the main body apparatus 2 and the leftcontroller 3 and the right controller 4 is optional. In the exemplaryembodiment, the controller communication section 83 performscommunication compliant with the Bluetooth (registered trademark)standard with the left controller 3 and with the right controller 4. Theprocessor 81 is connected to the left terminal 17, the right terminal21, and the lower terminal 27. When performing wired communication withthe left controller 3, the processor 81 transmits data to the leftcontroller 3 via the left terminal 17 and also receives operation datafrom the left controller 3 via the left terminal 17. Further, whenperforming wired communication with the right controller 4, theprocessor 81 transmits data to the right controller 4 via the rightterminal 21 and also receives operation data from the right controller 4via the right terminal 21. Further, when communicating with the cradle,the processor 81 transmits data to the cradle via the lower terminal 27.As described above, in the exemplary embodiment, the main body apparatus2 can perform both wired communication and wireless communication witheach of the left controller 3 and the right controller 4. Further, whenthe unified apparatus obtained by attaching the left controller 3 andthe right controller 4 to the main body apparatus 2 or the main bodyapparatus 2 alone is attached to the cradle, the main body apparatus 2can output data (e.g., image data or sound data) to a stationary monitoror the like via the cradle.

The main body apparatus 2 includes a touch panel controller 86, which isa circuit for controlling the touch panel 13. The touch panel controller86 is connected between the touch panel 13 and the processor 81. Basedon a signal from the touch panel 13, the touch panel controller 86generates, for example, data indicating the position where a touch inputis provided. Then, the touch panel controller 86 outputs the data to theprocessor 81.

The main body apparatus 2 includes a power control section 97 and abattery 98. The power control section 97 is connected to the battery 98and the processor 81. Further, although not shown, the power controlsection 97 is connected to components of the main body apparatus 2(specifically, components that receive power supplied from the battery98, the left terminal 17, and the right terminal 21). Based on a commandfrom the processor 81, the power control section 97 controls the supplyof power from the battery 98 to the above components.

Further, the battery 98 is connected to the lower terminal 27. When anexternal charging device (e.g., the cradle) is connected to the lowerterminal 27, and power is supplied to the main body apparatus 2 via thelower terminal 27, the battery 98 is charged with the supplied power.

(Overview of Image Generation Processing)

Image generation processing of this exemplary embodiment is describedbelow. The game system 1 according to this exemplary embodiment (anexemplary image processing system) arranges a virtual object in athree-dimensional virtual space, and performs a game using the virtualobject. The game system 1 generates, based on the virtual camera, animage of the virtual space including the virtual object and outputs thegenerated image to the display 12 or the stationary monitor(hereinafter, “display device”). The following is an overview of theimage generation processing performed in the game system 1 of thisexemplary embodiment.

FIG. 3 is a diagram showing an example of a three-dimensional modelrepresenting a virtual object 100 arranged in a virtual space. Thevirtual object 100 is a character object in the virtual space. Forexample, the character is a user-controllable player character. Itshould be noted that the virtual object 100 may be a non-playercharacter controlled automatically by the processor 81.

The virtual object 100 includes a body part 101 and an arm part 102connected to the body part 101. The body part 101 includes a pluralityof vertices V1 (black circles in FIG. 3 ), and the plurality of verticesV1 forms a generally spherical shape. The arm part 102 includes aplurality of vertices V2 (white circles in FIG. 3 ). For example, thearm part 102 has an oblong oval shape cut in half, with its distal endhaving a round and slightly pointed shape. A proximal portion of the armpart 102 is connected to and contacts the spherical surface of the bodypart 101. It should be noted that FIG. 3 shows only one arm part 102,however, another arm part 102 is provided on the opposite side of thebody part 101. The virtual object 100 may include other parts (such as aleg part) in addition to the body part 101 and the arm part 102, butthese parts will be omitted here for the sake of description.

For example, the virtual object 100 moves in the virtual space and makescertain actions in response to user operation. For example, the arm part102 of the virtual object 100 makes a motion based on an animation inresponse to user operation or the like. Specifically, while the proximalportion of the arm part 102 is in contact with the spherical surface ofthe body part 101, the arm part 102 moves on the spherical surface ofthe body part 101, and the posture of the arm part 102 changes withrespect to the body part 101.

The virtual object 100 shown in FIG. 3 is arranged in the virtual space.In the virtual space, a virtual camera, one or more light sources, thevirtual object 100, and other objects (e.g., objects fixed in thevirtual space, enemy objects capable of moving in the virtual space,etc.) are arranged. By the processor 81 performing the image generationprocessing, an image of the virtual object 100 viewed from the virtualcamera is generated and displayed on the display device. The imagegeneration processing adds shading based on the light source set in thevirtual space.

FIG. 4 is a diagram showing an overview of the image generationprocessing of this exemplary embodiment. FIG. 4 illustrates a flow ofprocessing in which the processor 81 (specifically, a GPU) renders thevirtual object 100 including the body part 101 and the arm part 102 in aframe buffer. In this exemplary embodiment, for example, deferredrendering (also referred to as deferred shading) is adopted as arendering method.

As shown in FIG. 4 , the processor 81 generates an image using a Gbuffer (Geometry Buffer) and a depth buffer. The G buffer and the depthbuffer are, for example, a storage area which is a part of a memorywithin the processor 81 or the DRAM 85. The G buffer includes a first Gbuffer which stores normal line information and a second G buffer whichstores color information. In the first G buffer, the normal lineinformation for each pixel at a time of generating an image is stored.That is, when a point P on the surface of the virtual object 100arranged in the virtual space is projected onto an image plane, thepoint P on the virtual object 100 is associated with a specific pixel Epon the image plane and the normal line information of the point P isstored in relation to that pixel Ep. Specifically, x, y, and zcoordinate values indicating the direction of the normal line are storedas the normal line information.

Further, in the second G buffer, the color information for each pixel isstored. Further, reflection information (specular), roughness, and thelike are stored in the G buffer.

Further, the depth buffer stores depth information indicating a depthvalue of each pixel (a value indicating the depth when viewed from thevirtual camera).

Specifically, in step 1, the processor 81 writes the body part 101 intothe G buffer. More specifically, the processor 81 writes the normal lineinformation of the body part 101 into the first G buffer and writes thecolor information of the body part 101 into the second G buffer.Although FIG. 4 shows a black-and-white circular image as the normalline information of the body part 101, it indicates the normal directionof each pixel in the form of grayscale of that pixel. It should be notedthat this image is only a conceptual representation of the normal lineinformation stored in the first G buffer as an image, and not anaccurate representation of the normal direction of each pixel in theform of grayscale of that pixel.

Further, the color information of the body part 101 written into thesecond G buffer is color information set in advance for the body part101, and is information related to a color determined irrespective ofthe light source, reflection, or the like. The color informationincludes information related to a base color (also called “albedo” ordiffuse reflected light). For example, the color information may be anRGB value. The color information of each pixel is written into thesecond G buffer. For example, in a case where the body part 101 isspherical and is red, a red circle is written into the second G bufferas the color information of the body part 101. Meanwhile, in a casewhere the body part 101 is spherical and has a pattern (texture) on itsspherical surface, a circle having that pattern is written into thesecond G buffer as the color information of the body part 101.

Further, in step 1, the processor 81 writes the depth information of thebody part 101 into the depth buffer. The depth information of the bodypart 101 is information related to the depth value of each pixel. Basedon the positions of the points of the body part 101 on its surface andthe position of the virtual camera, the processor 81 calculates thedepth values for each pixel of the body part 101 and writes thecalculated depth values into the depth buffer. It should be noted thatFIG. 4 shows a black-and-white circular image as the depth informationof the body part 101. This is a representation of the magnitude of thedepth value of each pixel stored in the depth buffer in the form ofgrayscale of that pixel. For example, in case where the depth valueincreases with an increase in the distance from the virtual camera, thecolor of the pixel becomes brighter with an increase in the depth valueand the color of the pixel becomes darker with a decrease in the depthvalue, in FIG. 4 .

Next, in step 2, the processor 81 writes the arm part 102 into the Gbuffer. Specifically, the processor 81 writes the color information ofthe arm part 102 into the second G buffer. Further, the processor 81writes the normal line information of the arm part 102 into the first Gbuffer. Further, the processor 81 writes the depth information of thearm part 102 into the depth buffer. Here, the processor 81 performsblend processing based on the depth information at a time of writing thenormal line information of the arm part 102 into the first G buffer instep 2. Details of step 2 will be described later.

Next, in step 3, the processor 81 performs rendering to the frame bufferbased on the information written into the G buffer and the light sourceinformation. In addition to this information, the rendering in step 3 isperformed by using the reflection information, roughness, and the like.Then, an image rendered in the frame buffer is output to the displaydevice and displayed.

The details of step 2 above will now be described. FIG. 5 is a diagramproviding a conceptual representation of processing performed at a timeof writing the arm part 102 into the G buffer in step 2 of FIG. 4 .

As shown in FIG. 5 , at the time of writing the normal line informationof the arm part 102 into the G buffer, the processor 81 first calculatesa difference between the depth value of the body part 101 and the depthvalue of the arm part 102 as step 2-1. Specifically, the processor 81calculates, for each pixel, the difference between the depth valuealready stored in the depth buffer (i.e., the depth value of the bodypart 101) and the depth value of the newly written arm part 102. Itshould be noted that in FIG. 5 , for the sake of clarity, the outline ofthe arm part 102 to be newly written into the depth buffer is shown as adashed line. As shown in FIG. 5 , the proximal portion of the arm part102 is connected to the body part 101, and therefore the depth values ofthe body part 101 and the arm part 102 are close in the connectingportion. That is, the difference between the depth value of the bodypart 101 and the depth value of the arm part 102 is small in thevicinity of the connecting portion (the rectangular portion indicated bythe solid line in FIG. 5 ). The greater the distance from the connectingportion, the greater the difference between the depth value of the bodypart 101 and the depth value of the arm part 102.

Next, in step 2-2, the processor 81 writes the normal line informationof the arm part 102 into the first G buffer. Specifically, the processor81 performs the blend processing that blends the normal line informationalready stored in the first G buffer (i.e., the normal line informationof the body part 101) with the normal line information of the newlywritten arm part 102 according to the depth value difference calculatedin step 2-1. The processor 81 performs the blend processing based on thedepth value difference for each pixel.

Specifically, the processor 81 blends the normal line informationalready stored in the first G buffer with the normal line information ofthe arm part 102 so that the proportion of the normal line informationalready stored in the first G buffer increases with a decrease in thedepth value difference, and writes the blended normal line informationinto the first G buffer. For example, the processor 81 calculates theblended normal line information so that the proportion of the normalline information already stored in the first G buffer is 100% for pixelshaving the depth value difference of “0”. That is, the normal lineinformation already stored in the first G buffer is maintained for thepixels with the depth value difference of “0”. For pixels with the depthvalue difference between 0 and a predetermined value, the blended normalline information is calculated so that the smaller the depth valuedifference, the closer the blended normal line information becomes tothe normal line information of the body part 101 already stored. Forpixels with the depth value difference exceeding the predeterminedvalue, the proportion of normal line information for the arm part 102 is100%. That is, for pixels with the depth value difference exceeding thepredetermined value, the normal line information already stored in thefirst G buffer is overwritten by the normal line information of the armpart 102.

For example, the processor 81 may calculate the normal line informationof each pixel based on the following Formula 1, and write the calculatednormal line information into the first G buffer.

Normal line information=Normal line information of the bodypart×w+Normal line information of the arm part×(1−w)  (Formula 1)

In the formula, w is the blend ratio, indicating the proportion of thenormal line information of the body part 101. The value of w may bewithin a range of 0 to 1. For example, the value of w is 1 when thedepth value difference is 0, and linearly varies according to the depthvalue difference within a range of 0 to a predetermined value. When thedepth value difference exceeds the predetermined value, the value of Wis 0. Further, the normal line information is the coordinate values ofthe x, y, and z axes indicating the normal direction. Thus, for pixelshaving a relatively small depth value difference, the normal lineinformation of the body part 101 already stored in the first G bufferand the normal line information of the arm part 102 are blended andwritten into the first G buffer. The smaller the depth value difference,the closer the calculated normal direction becomes to the normaldirection of the body part 101 already stored in the first G buffer.

It should be noted that, by “the normal line information of the bodypart 101 and the normal line information of the arm part 102 areblended”, it means calculating a value between the normal lineinformation of the body part 101 and the normal line information of thearm part 102, and encompasses, for example, calculating a linearinterpolation between the normal line information of the body part 101and the normal line information of the arm part 102. It should be notedthat the method for blending the two values is not limited to linearinterpolation, and any method may be used. For example, the normal lineinformation of the body part 101 and the normal line information of thearm part 102 may be blended according to the depth value difference,based on a predetermined function. Further, for example, a plurality ofblend ratios may be defined in advance according to the depth valuedifference, and the normal line information of the body part 101 and thenormal line information of the arm part 102 may be blended at any of theblend ratios defined in advance.

Thus, the depth value difference is calculated for each pixel, and theblend processing is performed to blend the normal line information ofthe body part 101 with the normal line information of the arm part 102based on the difference. This reduces the difference in the normaldirection of the connecting portion between the body part 101 and thearm part 102. FIG. 5 is a diagram showing a direction indicated by thenormal direction written into the first G buffer, when viewed in alateral direction in the virtual space. (a) of FIG. 5 shows a case wherethe blend processing for the normal line information of the body part101 and the normal line information of the arm part 102 is notperformed. In this case, the arm part 102 is arranged so as to protrudefrom the surface of the body part 101. Therefore, the normal directionof the body part 101 and the normal direction of the arm part 102 aresignificantly different from each other in the connecting portionbetween the body part 101 and the arm part 102 and the angle formed bythese normal directions is, for example, about 90 degrees.

On the other hand, in a case of performing the blend processing, thenormal direction of the arm part 102 newly written into the first Gbuffer approximates to the normal direction of the body part 101 alreadystored in the first G buffer, in the connecting portion between the bodypart 101 and the arm part 102 as shown in (b) of FIG. 5 . The normalline information newly written into the first G buffer becomes closer tothe original normal line information of the arm part 102, with anincrease in the distance from the connecting portion.

When an image is drawn in the frame buffer, a calculation related toshading is performed, based on the position and direction of the lightsource and the normal line information stored in the G buffer, togenerate a shaded image. In the image generation processing of thisexemplary embodiment, the normal line information of the body part 101and the normal line information of the arm part 102 in the vicinity ofthe connecting portion between the body part 101 and the arm part 102are blended. Therefore, in the vicinity of the connecting portion, thenormal direction of the body part 101 and the normal direction of thearm part 102 becomes closer, and the shading of the connecting portionbecomes closer. This allows a less conspicuous connecting portionbetween the body part 101 and the arm part 102, and allows the arm part102 to fit in with the body part 101.

In addition to the normal line information, the color information may besubjected to blend processing through a method similar to theabove-described method. Specifically, at a time of writing the colorinformation of the arm part 102 into the second G buffer, a differencebetween the depth value of the arm part 102 and the depth value of thebody part 101 stored in the depth buffer is calculated, and according tothe difference, the color information of the body part 101 alreadystored in the second G buffer and the arm part 102 are blended, and theresulting blended color information is written into the second G buffer.Specifically, the color information of the body part 101 and the colorinformation of the arm part 102 are blended so that the proportion ofthe already-stored color information of the body part 101 increases witha decrease in the depth value difference. This makes the colorinformation of the body part 101 and the color information of the armpart 102 close to each other in the connecting portion, and allows thearm part 102 to fit in with the body part 101.

For example, the processor 81 may calculate the color information ofeach pixel based on the following Formula 2, and write the calculatedcolor information into the second G buffer.

Color information=color information of body part×w2+color information ofarm part×(1−w2)  (Formula 2)

In the formula w2 is a blend ratio, which indicates the proportion ofthe color information of the body part 101. For example, the value of w2is 1 when the depth value difference is 0, and linearly varies accordingto the depth value difference within a range of to a predeterminedvalue. When the depth value difference exceeds the predetermined value,the value of w2 is 0.

FIG. 6 is a diagram providing a conceptual representation of an image ofthe virtual object 100 in a case where the blend processing is notperformed and an image of the virtual object 100 in a case where theblend processing is performed. The left side of FIG. 6 shows an image ofthe virtual object 100 in the case where the blend processing of thenormal line information is not performed, whereas the right side of FIG.6 shows an image of the virtual object 100 in the case where the blendprocessing of the normal line information is performed. As shown in FIG.6 , in the case where the blend processing of the normal lineinformation is not performed, the connecting portion between the bodypart 101 and arm part 102 is relatively clear, although this may dependon the position and direction of the light source. This is because theshading of the body part 101 and the shading of the arm part 102 differdepending on the position and direction of the light source. On theother hand, in the case where the blend processing of the normal lineinformation is performed, the normal directions in the vicinity of theconnecting portion between the body part 101 and the arm part 102 becomecloser to each other. This blurs the connecting portion between the bodypart 101 and the arm part 102 irrespective of the position and directionof the light source, thus achieving an image in which these parts looksmoothly connected. As a result, a natural image with a less conspicuousconnecting portion between the body part 101 and the arm part 102 can begenerated. The less conspicuous connecting portion between the body part101 and the arm part 102 can be achieved even when the arm part 102moves relative to the body part 101, and the arm part 102 can be fit inwith the body part 101. That is, when the arm part 102 moves relative tothe body part 101 during the game, the angle between the arm part 102and the body part 101 may change from an acute angle to an obtuse angle;however, the normal line information is subjected to the blendprocessing as described above in the image generation processing, nomatter how the relative position and posture of the arm part 102 and thebody part 101 change. As a result, the normal directions in the vicinityof the connecting portion between the body part 101 and the arm part 102become closer and an image with a less conspicuous connecting portionbetween the body part 101 and the arm part 102 can be generated.

It should be noted that the similar processing is also performed in acase of connecting a portion other than the arm part 102 (e.g., a legpart, a head part, and the like) to the body part 101. For example,after the body part 101 is written into the G buffer and at a time ofwriting a leg part into the G buffer, the difference between the depthinformation of the body part 101 and the depth information of the legpart is calculated. According to this difference, the normal lineinformation of the body part 101 already stored in the first G bufferand the normal line information of the leg part are blended, and theresulting blended normal line information is written into the first Gbuffer. Then, rendering is performed based on the information writteninto the G buffer, the light source information, the reflectioninformation, the roughness, and the like.

(Details of Image Generation Processing)

Next, the following describes details of image generation processing.First, data stored in the memory (the memory within the processor 81,the DRAM 85, the flash memory 84, an external storage medium, or thelike) of the main body apparatus 2 will be described. FIG. 7 is adiagram showing exemplary data stored in a memory of the main bodyapparatus 2 while game processing is executed.

As shown in FIG. 7 , the memory of the main body apparatus 2 (the memoryin the processor 81, the DRAM 85, the flash memory 84, or the externalstorage medium or the like) stores a program, operation data, virtualobject data, and light source information. The memory (e.g., the memoryin the processor 81) includes the G buffer, the depth buffer, and theframe buffer. The G buffer has the first G buffer which stores thenormal line information and the second G buffer which stores the colorinformation. Further, the G buffer includes an area that stores thereflection information.

The program is a program for executing the later-described gameprocessing. The program includes an image processing program forperforming image generation processing, which will be described later.The program is stored in advance in the external storage medium mountedin the slot 23 or the flash memory 84 and is read into the DRAM 85 at atime of executing the game. The program may be obtained from anotherdevice via a network (e.g., the Internet).

The operation data is data related to operations obtained from the leftcontroller 3 and the right controller 4. For example, the operation datais transmitted from the left controller 3 and the right controller 4 tothe main body apparatus 2 at predetermined time intervals (e.g., atintervals of 1/200 sec), and is stored in the memory.

The virtual object data is data related to the virtual object 100 andincludes data related to an exterior appearance such as the shape andthe like of the virtual object 100. Specifically, the virtual objectdata includes data related to the shape of the body part 101 of thevirtual object 100, data related to the shape of the arm part 102, datarelated to the color of the body part 101, data related to the color ofthe arm part 102, and the like. The virtual object data includes datarelated to the reflection information of the body part 101 and the armpart 102. The virtual object data includes data related to the positionand direction of the virtual object 100 in the virtual space, as well asdata related to the position and posture of the arm part 102 relative tothe body part 101.

The light source information is information related to the light sourcesset in the virtual space. The light source information includesinformation related to the number of light sources, type, position, anddirection of each light source. Note that, in this exemplary embodiment,the number of light sources, type, position, and direction of each lightsource varies depending on the scene of the game.

The G buffer includes the first G buffer that stores the normal lineinformation and the second G buffer that stores the color information.Further, the reflection information is stored in the G buffer. Further,the depth information is stored in the depth buffer. Further, an imageoutput to the display device is stored in the frame buffer.

(Details of Game Processing in Main Body Apparatus 2)

Next, the following details the game processing performed in the mainbody apparatus 2. FIG. 8 is a flowchart showing exemplary gameprocessing executed by the processor 81 of the main body apparatus 2.

As shown in FIG. 8 , the processor 81 first executes initial processing(step S100). Specifically, the processor 81 sets a three-dimensionalvirtual space and arranges the virtual object 100, the virtual camera,the light sources, and various other objects used in the game in thevirtual space. After executing the initial processing, the processor 81repeats steps S101 to S106 at predetermined frame time intervals (e.g.,at intervals of 1/60 sec).

In step S101, the processor 81 obtains operation data from thecontroller.

Next, the processor 81 performs control of the virtual object 100 basedon the operation data obtained (step S102). The processor 81 causes thevirtual object 100 to move in the virtual space or make a predeterminedaction based on the operation data. The processor 81 also causes thebody part 101 and the arm part 102 of the virtual object 100 and thelike to make a motion based on the operation data. Further, theprocessor 81 performs processing according to the control of the virtualobject 100 (for example, processing according to predetermined actions).

Next, the processor 81 controls the virtual camera (step S103). Theprocessor 81 controls the virtual camera so that the virtual object 100is within the field of view of the virtual camera. For example, theprocessor 81 moves the virtual camera in the virtual space, changes theposture of the virtual camera, or the like in response to the movementof the virtual object 100. Further, the processor 81 may change theposition and posture of the virtual camera based on the operation data.

Next, the processor 81 performs image generation processing (step S104).Here, an image is generated through the above-described method andstored in the frame buffer. The image generation processing of step S104will be described in detail later.

Next, the processor 81 performs image output processing (step S105).Specifically, the processor 81 outputs the image stored in the framebuffer in step S104 to the display device (the display 12 or an externaldisplay device). Further, the processor 81 outputs audio according tothe result of the processing in step S102.

The processor 81 then determines whether to terminate the gameprocessing (step S106). For example, when termination of the game isinstructed by the player, the processor 81 determines that the gameprocessing is to be terminated (step S106: Yes) and terminates the gameprocessing shown in FIG. 8 . When the processor 81 determines not toterminate the game processing (step S106: NO), the processing of stepS101 is executed again. This is the end of the description of the gameprocessing shown in FIG. 8 .

(Image Generation Processing)

Next, the image generation processing in step S104 is detailed below.FIG. 9 is a flowchart showing exemplary image generation processing ofstep S104. It should be noted that, although FIG. 9 deals with anexemplary case of generating an image of a virtual object 100 having thebody part 101 and the arm part 102, the virtual object 100 may also haveparts other than the body part 101 and the arm part 102. Further,although the same processing as for the virtual object 100 is alsoperformed for other objects within the image capturing range of thevirtual camera, description of the processing for the other objects isomitted.

In step S121, the processor 81 writes the normal line information andthe color information of the body part 101 into the G buffer.Specifically, the processor 81 first performs a depth test to determinethe front-back positional relationship of the objects. If there is noobject on the front side of the body part 101 (on a side closer to thevirtual camera), the processor 81 writes the normal line information ofthe body part 101 into the first G buffer and writes the colorinformation of the body part 101 into the second G buffer. Further, theprocessor 81 writes the depth information of the body part 101 into thedepth buffer (step S122).

Next, the processor 81 calculates the depth value of the arm part 102and performs a depth test (step S123). If the depth value of the armpart 102 is smaller than the depth value of the body part 101 as theresult of the depth test (if the arm part 102 is positioned closer tothe virtual camera than the body part 101 is to the same), the processor81 proceeds to a subsequent processing of step S124.

In step S124, the processor 81 reads the depth value of the body part101 having been written into the depth buffer, and calculates adifference d between the depth value of the body part 101 and the depthvalue of the arm part 102 calculated in step S123. Here, the processor81 calculates the depth value difference d between each pixel.

Next, the processor 81 writes, into the first G buffer, normal lineinformation resulting from blending the normal line information of thebody part 101 already stored in the first G buffer with the normal lineinformation of the arm part 102, based on the depth value difference d(step S125). Specifically, the processor 81 calculates normal lineinformation resulting from blending the normal line information of thebody part 101 with the normal line information of the arm part 102 sothat the proportion of the normal line information of the body part 101already stored in the first G buffer increases with a decrease in thedifference d. For example, the processor 81 calculates the normal lineinformation of each pixel based on the above-described Formula 1. Then,the processor 81 writes the calculated normal line information into thefirst G buffer.

Next, the processor 81 writes the color information of the arm part 102into the second G buffer (step S126). In this step, the processor 81writes, into the second G buffer, color information resulting fromblending the color information of the body part 101 already stored inthe second G buffer with the color information of the arm part 102,based on the depth value difference d. Specifically, the processor 81calculates color information resulting from blending the colorinformation of the body part 101 with the color information of the armpart 102 so that the proportion of the color information of the bodypart 101 already stored in the second G buffer increases with a decreasein the difference d, and write the calculated color information into thesecond G buffer. It should be noted that, in step S126, the processor 81may write the color information of the arm part 102 into the second Gbuffer without performing the above-described blend processing.

Next, the processor 81 writes the depth information of the arm part 102into the depth buffer (step S127).

The processor 81 then performs drawing processing based on theinformation stored in the G buffer and the light source information(step S128). Specifically, the processor 81 renders an image in theframe buffer based on the normal line information, the colorinformation, and the reflection information stored in the G buffer, thelight source information, and the like. In the step, shading iscalculated for each pixel based on the normal line information stored inthe G buffer and the light source information, and a light reflectioneffect is further added based on the reflection information. Further, inaddition to these sets of information, the processor 81 may render theimage based on the roughness, the depth information, and the like. Thisway, an image with shading and reflection added is thus generated andstored in the frame buffer. This is the end of the description of theimage generation processing shown in FIG. 9 .

As described above, in the image generation processing of this exemplaryembodiment, the processor 81 first writes, for the body part 101 (thefirst object) of the virtual object 100, the normal line information andthe color information into the G buffer and the depth information intothe depth buffer (steps S121 to S122). Then, for the arm part 102 (thesecond object), the processor 81 then writes the normal line informationand the color information into the G buffer and the depth informationinto the depth buffer (steps S124 to S127). Specifically, when writingthe normal line information of the arm part 102 into the G buffer (stepS125), the processor 81 writes the normal line information of the armpart 102 into the G buffer (step S125) so that the normal lineinformation of the body part 101 already stored in the G buffer isblended with the normal line information of the arm part 102 for aportion where the difference between the depth information of the armpart 102 and the depth information of the body part 101 already storedin the depth buffer is small. The processor 81 then renders an imagebased on the information written into the G buffer (normal lineinformation, color information, and the like) and the light sourceinformation, and stores the image in the frame buffer.

Thus, by blending the normal line information of the body part 101 andarm part 102 for a portion where the depth values of the body part 101and the arm part 102 are close, it is possible to generate an image witha less conspicuous connecting portion between the body part 101 and thearm part 102, allowing the arm part 102 to fit in with the body part101.

It should be noted that blend processing similar to the one describedhereinabove may be performed not only for the normal line informationand the color information, but also for the reflection information. Forexample, based on the depth value difference d, a value in which areflection-related parameter of the body part 101 and thereflection-related parameter of the arm part 102 are blended iscalculated. If the reflection-related parameter value of the body part101 and that of the arm part 102 are significantly different in theconnecting portion between the body part 101 and the arm part 102, theseparameter values are blended to be close to each other. This allows aless conspicuous connecting portion between the body part 101 and thearm part 102, and allows the arm part 102 to fit in with the body part101.

(Modification)

Image processing of this exemplary embodiment is thus describedhereinabove. It should be noted that the above-described exemplaryembodiment is no more than an example, and for example, the followingmodifications are possible.

For example, the above-described exemplary embodiment deals with a casewhere the body part 101 is first written into the G buffer, and then thearm part 102 is written into the G buffer. In another exemplaryembodiment, the arm part 102 may be first written into the G buffer, andthen the body part 101 may be written into the G buffer. In this case,the difference between the depth value of the arm part 102 alreadystored in the depth buffer and the depth value of the body part 101 iscalculated at a time of writing the body part 101 into the G buffer. Thenormal line information of the body part 101 and the normal lineinformation of the arm part 102 are blended so that the proportion ofthe normal line information of the arm part 102 already stored in the Gbuffer increases with a decrease in the difference. Then, the blendednormal line information is written into the G buffer. This way, thecloser a portion is to the connecting portion between the body part 101and the arm part 102, the closer the normal line information of thatportion of the body part 101 written later becomes to the normal lineinformation of the arm part 102 already stored. This way, an image withthe body part 101 that appears to fit in with the arm part 102 isdisplayed. The same applies to a case of blending the color information,the reflection information, or the like.

Further, the above-described exemplary embodiment deals with a casewhere the body part 101, which is one portion of the virtual object 100,is written into the G buffer, and then the arm part 102, which isanother portion of the same virtual object 100, is written into the Gbuffer. In another exemplary embodiment, the first object may be writteninto the G buffer, and then the second object may be written into the Gbuffer. When writing the second object into the G buffer, the blendprocessing may be performed in accordance with the difference in thedepth information, as described above.

That is, the processor 81 may write the color information and the normalline information of the first object into the G buffer, write the depthinformation of the first object into the depth buffer, and then writethe color information and the normal line information of the secondobject to the G buffer, and write the depth information of the secondobject to the depth buffer. When writing the normal line information ofthe second object into the G buffer, the processor 81 may calculate adifference between the depth information of the first object alreadystored in the depth buffer and the depth information of the secondobject and write, into the G buffer, the normal line information inwhich the normal line information of the first object and the normalline information of the second object are blended so that the proportionof the normal line information of the first object already stored in theG buffer increases with a decrease in the difference.

The shapes of the first object and the second object are not limited toa smooth curved shape as in the case of the body part 101 and the armpart 102 described above and may be any given shape. For example, thefirst object and the second object may have a shape having angles suchas a cube. Further, the first object and the second object are notlimited to a part of a character object and may be any object. The firstobject and the second object may be separate objects.

Further, the above-described exemplary embodiment deals with a casewhere the normal line information of the body part 101 and the normalline information of the arm part 102 are blended at a blend ratioaccording to the depth value difference. In another exemplaryembodiments, the normal line information of the body part 101 and thenormal line information of the arm part 102 may be blended at apredetermined blend ratio, if the depth value difference is within apredetermined range. That is, the normal line information of the bodypart 101 and the normal line information of the arm part 102 may beblended at a single blend ratio (for example, 50%) for pixels with thedepth value difference within the predetermined range. The same appliesto the color information, the reflection information, and the like.

Further, in another exemplary embodiment, the above-described blendprocessing may be performed only for the normal line information, theabove-described blend processing may be performed only for the colorinformation, or the above-described blend processing may be performedonly for the reflection information.

Further, the above-described exemplary embodiment deals with a casewhere the depth information is written into the depth buffer; however,in another embodiment, the depth information may be written into the Gbuffer. Further, the information written into each of the buffers may bewritten into another buffer.

The above deals with a case where the deferred rendering is used torender an image; however, forward rendering may be used to render animage. Depending on the scene of the game of this exemplary embodiment,there may be a case of using the deferred rendering to render the imageand a case of using the forward rendering to render the image. Forexample, the deferred rendering may be used to render the image in ascene with a plurality of light sources in the virtual space, and theforward rendering may be used to render the image in another scene withrelatively few light sources.

In the case of using the forward rendering to render the image, theimage may be rendered using the normal line information resulting fromblending according to the depth value difference, as described above.Specifically, first, the depth value is written into the depth bufferfor the first object, the normal line information is written into thenormal line buffer that stores normal line information, and the image isdrawn in the frame buffer. Then, the difference between the depth valueof the second object and the depth value stored in the depth buffer maybe calculated for the second object at a time of rendering the image inthe frame buffer, and the normal line information of the second objectand the normal line information already stored in the normal line buffermay be blended for the portion where the difference is small, and theimage may be rendered based on the blended normal line information. Inthis case, the normal line information may be blended at a blend ratioaccording to the depth value difference, or the normal line informationmay be blended at a predetermined blend ratio for a pixel where thedepth value difference is within a predetermined range.

Additionally, in the case of using the forward rendering to render theimage, the color information of each object (the image of each object)may be blended according to the depth value difference as describedabove. Specifically, first, the depth value is written into the depthbuffer for the first object, and an image of the first object (an imageto which a shading has been added) is drawn in the frame buffer. Then,the difference between the depth value of the second object and thedepth value stored in the depth buffer (the depth value of the firstobject) may be calculated for the second object at a time of drawing theimage in the frame buffer, and the image of the second object and theimage already stored in the frame buffer (the image of the first object)may be blended for the portion where the difference is small. At thetime of blending the two images, the color information (e.g., the RGBvalue) may be blended at a blend ratio according to the depth valuedifference, as described above. Further, the color information may beblended at a predetermined blend ratio for pixels where the depth valuedifference is within the predetermined range.

Further, although the above-described exemplary embodiment deals with acase of performing a game involving the virtual object 100, the use ofthe above-described image generation processing is not limited to thegame image, and may be used at a time of generating any image.

The configuration of hardware is merely an example. Alternatively, theabove image generation processing may be performed by any other piece ofhardware. For example, the above processing may be executed in anyinformation processing apparatus such as a personal computer, a tabletterminal, a smartphone, or a server on the Internet. Further, the aboveprocessing may be executed by an information processing system includinga plurality of apparatuses.

The configurations of the above exemplary embodiment and its variationscan be optionally combined together unless they contradict each other.Further, the above description is merely an example of the exemplaryembodiment, and may be improved and modified in various manners otherthan the above.

While certain example systems, methods, devices and apparatuses havebeen described herein, it is to be understood that the appended claimsare not to be limited to the systems, methods, devices and apparatusesdisclosed, but on the contrary, are intended to cover variousmodifications and equivalent arrangements included within the spirit andscope of the appended claims.

What is claimed is:
 1. A non-transitory computer-readable storage mediumstoring an image processing program configured to cause a computer of aninformation processing apparatus to generate an image of an object in avirtual space based on deferred rendering, wherein the image processingprogram causes the computer to: perform first processing including atleast writing of depth information of a first object into a depthbuffer, writing of normal line information of the first object into afirst buffer, and writing of color information of the first object intoa second buffer; after the first processing, perform a depth test on asecond object in the virtual space and second processing including atleast writing of the depth information of the second object into thedepth buffer, writing of the normal line information of the secondobject into the first buffer, and writing of the color information ofthe second object into the second buffer; at a time of writing thenormal line information of the second object into the first buffer inthe second processing, write the normal line information of the secondobject into the first buffer so that, based on a difference between thedepth information of the second object and the depth information alreadystored in the depth buffer, the normal line information of the secondobject is blended with the normal line information already stored in thefirst buffer for a portion where the difference is small; and generatean image by rendering based on information stored in at least the firstbuffer and the second buffer.
 2. The non-transitory computer-readablestorage medium of claim 1 storing the image processing program, whereinthe image processing program causes the computer to write blended normalline information into the first buffer at a time of writing the normalline information of the second object into the first buffer, the blendednormal line information obtained by blending the normal line informationof the second object with the normal line information already stored inthe first buffer at a blend ratio according to the difference.
 3. Thenon-transitory computer-readable storage medium of claim 2 storing theimage processing program, wherein the blend ratio is set so that aproportion of the normal line information already stored in the firstbuffer increases with a decrease in the difference.
 4. Thenon-transitory computer-readable storage medium of claim 1 storing theimage processing program, wherein the image processing program causesthe computer to write blended normal line information into the firstbuffer at a time of writing the normal line information of the secondobject into the first buffer, the blended normal line informationobtained by blending the normal line information of the second objectwith the normal line information already stored in the first buffer at apredetermined blend ratio for a pixel where the difference is within apredetermined range.
 5. The non-transitory computer-readable storagemedium of claim 2 storing the image processing program, wherein theimage processing program further causes the computer to at a time ofwriting the color information of the second object into the secondbuffer, write the color information of the second object into the secondbuffer so that, based on the difference, the color information of thesecond object is blended with the color information already stored inthe second buffer for the portion where the difference is small.
 6. Thenon-transitory computer-readable storage medium of claim 2 storing theimage processing program, wherein: the first object is a first part of acharacter; and the second object is a second part of the character.
 7. Anon-transitory computer-readable storage medium storing an imageprocessing program for causing a computer of an information processingapparatus to generate an image of an object in a virtual space, whereinthe image processing program causes the computer to: perform firstprocessing including at least writing of depth information of a firstobject into a depth buffer, writing of normal line information of thefirst object into a normal line buffer, and drawing of the first objectinto a frame buffer; after the first processing, perform a depth test ona second object in the virtual space and second processing includingdrawing of the second object in the frame buffer; and in the drawing ofthe second object in the frame buffer in the second processing,calculate normal line information so that, based on a difference betweenthe depth information of the second object and the depth informationalready stored in the depth buffer, the normal line information of thesecond object is blended with the normal line information already storedin the normal line buffer for a portion where the difference is smalland perform rendering based on the calculated normal line information.8. An image processing system, comprising at least one processor, togenerate an image of an object in a virtual space based on deferredrendering, wherein the at least one processor is configured to: performfirst processing including at least writing of depth information of afirst object into a depth buffer, writing of normal line information ofthe first object into a first buffer, and writing of color informationof the first object into a second buffer; after the first processing,perform a depth test on a second object in the virtual space and secondprocessing including at least writing of the depth information of thesecond object into the depth buffer, writing of the normal lineinformation of the second object into the first buffer, and writing ofthe color information of the second object into the second buffer; at atime of writing the normal line information of the second object intothe first buffer in the second processing, write the normal lineinformation of the second object into the first buffer so that, based ona difference between the depth information of the second object and thedepth information already stored in the depth buffer, the normal lineinformation of the second object is blended with the normal lineinformation already stored in the first buffer for a portion where thedifference is small; and generate an image by rendering based oninformation stored in at least the first buffer and the second buffer.9. The image processing system of claim 8, wherein the at least oneprocessor is configured to write blended normal line information intothe first buffer at a time of writing the normal line information of thesecond object into the first buffer, the blended normal line informationobtained by blending the normal line information of the second objectwith the normal line information already stored in the first buffer at ablend ratio according to the difference.
 10. The image processing systemof claim 9, wherein the blend ratio is set so that a proportion of thenormal line information already stored in the first buffer increaseswith a decrease in the difference.
 11. The image processing system ofclaim 8, wherein the at least one processor is configured to writeblended normal line information into the first buffer at a time ofwriting the normal line information of the second object into the firstbuffer, the blended normal line information obtained by blending thenormal line information of the second object with the normal lineinformation already stored in the first buffer at a predetermined blendratio for a pixel where the difference is within a predetermined range.12. The image processing system of claim 9, wherein the at least oneprocessor is further configured to at a time of writing the colorinformation of the second object into the second buffer, write the colorinformation of the second object into the second buffer so that, basedon the difference, the color information of the second object is blendedwith the color information already stored in the second buffer for theportion where the difference is small.
 13. The image processing systemof claim 9, wherein: the first object is a first part of a character;and the second object is a second part of the character.
 14. An imageprocessing system, comprising at least one processor, to generate animage of an object in a virtual space, wherein the at least oneprocessor is configured to: perform first processing including at leastwriting of depth information of a first object into a depth buffer,writing of normal line information of the first object into a normalline buffer, and drawing of the first object into a frame buffer; afterthe first processing, perform a depth test on a second object in thevirtual space and second processing including drawing of the secondobject in the frame buffer; and in the drawing of the second object inthe frame buffer in the second processing, calculate normal lineinformation so that, based on a difference between the depth informationof the second object and the depth information already stored in thedepth buffer, the normal line information of the second object isblended with the normal line information already stored in the normalline buffer for a portion where the difference is small and performrendering based on the calculated normal line information.
 15. An imageprocessing apparatus, comprising at least one processor, to generate animage of an object in a virtual space based on deferred rendering,wherein the at least one processor is configured to: perform firstprocessing including at least writing of depth information of a firstobject into a depth buffer, writing of normal line information of thefirst object into a first buffer, and writing of color information ofthe first object into a second buffer; after the first processing,perform a depth test on a second object in the virtual space and secondprocessing including at least writing of the depth information of thesecond object into the depth buffer, writing of the normal lineinformation of the second object into the first buffer, and writing ofthe color information of the second object into the second buffer; at atime of writing the normal line information of the second object intothe first buffer in the second processing, write the normal lineinformation of the second object into the first buffer so that, based ona difference between the depth information of the second object and thedepth information already stored in the depth buffer, the normal lineinformation of the second object is blended with the normal lineinformation already stored in the first buffer for a portion where thedifference is small; and generate an image by rendering based oninformation stored in at least the first buffer and the second buffer.16. The image processing apparatus of claim 15, wherein the at least oneprocessor is configured to write blended normal line information intothe first buffer at a time of writing the normal line information of thesecond object into the first buffer, the blended normal line informationobtained by blending the normal line information of the second objectwith the normal line information already stored in the first buffer at ablend ratio according to the difference.
 17. The image processingapparatus of claim 16, wherein the blend ratio is set so that aproportion of the normal line information already stored in the firstbuffer increases with a decrease in the difference.
 18. The imageprocessing apparatus of claim 15, wherein the at least one processor isconfigured to write blended normal line information into the firstbuffer at a time of writing the normal line information of the secondobject into the first buffer, the blended normal line informationobtained by blending the normal line information of the second objectwith the normal line information already stored in the first buffer at apredetermined blend ratio for a pixel where the difference is within apredetermined range.
 19. The image processing apparatus of claim 16,wherein the at least one processor is further configured to at a time ofwriting the color information of the second object into the secondbuffer, write the color information of the second object into the secondbuffer so that, based on the difference, the color information of thesecond object is blended with the color information already stored inthe second buffer for the portion where the difference is small.
 20. Theimage processing apparatus of claim 16, wherein: the first object is afirst part of a character; and the second object is a second part of thecharacter.
 21. An image processing method for generating an image of anobject in a virtual space based on a deferred rendering, comprising:performing a first step including at least writing of depth informationof a first object into a depth buffer, writing of normal lineinformation of the first object into a first buffer, and writing ofcolor information of the first object into a second buffer; after thefirst step, perform a depth test on a second object in the virtual spaceand a second step including at least writing of the depth information ofthe second object into the depth buffer, writing of the normal lineinformation of the second object into the first buffer, and writing ofthe color information of the second object into the second buffer; at atime of writing the normal line information of the second object to thefirst buffer in the second step, writing the normal line information ofthe second object into the first buffer so that, based on a differencebetween the depth information of the second object and the depthinformation already stored in the depth buffer, the normal lineinformation of the second object is blended with the normal lineinformation already stored in the first buffer for a portion where thedifference is small; and generating an image by rendering based oninformation stored in at least the first buffer and the second buffer.22. The image processing method of claim 21, wherein blended normal lineinformation is written into the first buffer at a time of writing thenormal line information of the second object into the first buffer, theblended normal line information obtained by blending the normal lineinformation of the second object with the normal line informationalready stored in the first buffer at a blend ratio according to thedifference.
 23. The image processing method of claim 22, wherein theblend ratio is set so that a proportion of the normal line informationalready stored in the first buffer increases with a decrease in thedifference.
 24. The image processing method of claim 21, wherein blendednormal line information is written into the first buffer at a time ofwriting the normal line information of the second object into the firstbuffer, the blended normal line information obtained by blending thenormal line information of the second object with the normal lineinformation already stored in the first buffer at a predetermined blendratio for a pixel where the difference is within a predetermined range.25. The image processing method of claim 22, wherein, at a time ofwriting the color information of the second object into the secondbuffer, the color information of the second object is written into thesecond buffer so that, based on the difference, the color information ofthe second object is blended with the color information already storedin the second buffer for the portion where the difference is small. 26.The image processing method of claim 22, wherein: the first object is afirst part of a character; and the second object is a second part of thecharacter.